package fr.afcepf.ai89.esharing.data;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import fr.afcepf.ai89.esharing.entity.Civilite;
import fr.afcepf.ai89.esharing.entity.Marque;

@Stateless
public class DAOCivilite implements IDAOCivilite {

	@PersistenceContext(unitName = "ESharingPhase22")
	EntityManager em;

	@Override
	public Civilite getCiv(int idCiv) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Civilite> getCivs() {
		
		Query hql = em.createQuery("SELECT c from Civilite c");

		List<Civilite> civs = (List<Civilite>)hql.getResultList();

		return civs;
		
	}

	@Override
	public int addCiv(Civilite civ) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int majCiv(Civilite civ) {
		// TODO Auto-generated method stub
		return 0;
	}

}
